/*
 * This program is part of the OpenLMIS logistics management information system platform software.
 * Copyright © 2013 VillageReach
 *
 * This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
 *  
 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public License for more details.
 * You should have received a copy of the GNU Affero General Public License along with this program.  If not, see http://www.gnu.org/licenses.  For additional information contact info@OpenLMIS.org. 
 */

.record-facility-data {
  .facility-heading {
    border-bottom: 1px solid #d6d6d6;
    margin-bottom: 13px;
    h2 {
      display: inline;
      vertical-align: middle;
      border-bottom: none;
    }
    .distribution-legend {
      margin: 10px 40px 10px 10px;
      .status-icon {
        margin: 0 0 0 15px;
      }
    }
  }
  #noFacilitySelected {
    margin-left: 0;
  }
  .info-box {
    padding-bottom: 8px;

    .info-box-labels {
      padding-top: 5px;
    }
  }
  .select2-container, #selectFacility {
    width: 100%;
    margin-bottom: 0px;
  }
  .facility-change-dropdown {
    position: relative;
  }
}

.facility-info {
  min-height: 535px;
  margin-left: 175px;
  background: #fff;
  border-left: 1px solid #d2d2d2;

  label {
    margin-right: 15px;
    font-size: 0.9em;
  }

  .radio-label {
    font-weight: bold;
    display: inline;
  }

  input[type="radio"] {
    vertical-align: text-top;
    margin-top: 1px;
    margin-right: 2px;
  }

  #visitDateContainer, #vehicleIdContainer {
    display: inline-block;
    width: 300px;
    input[type="text"] {
      width: 82%;
    }
  }
}

.facility-container {
  background: #f2f2f2;
  border: 1px solid #d2d2d2;
  position: relative;
}

.left-navigation {
  position: absolute;
  width: 175px;
  ul {
    list-style-type: none;
    margin-left: 0;
    li {
      border-bottom: 1px solid #d2d2d2;
      a {
        display: block;
        text-decoration: none;
        padding: 15px 13px;
        color: #808080;
        font-size: 1.1em;
      }
      &:hover {
        background: #f5f5f5;
      }
      &.selected {
        background: white;
        border-right: 1px solid white;
        width: 100%;
        position: relative;
        a {
          color: #17888f;
        }
      }
    }

  }
}

.select2-results {
  ul.select2-result-sub {
    & > li {
      .select2-result-label {
        padding-left: 12px;
      }
    }
  }
}

.position-fixing {
  position: relative;
  top: 14px;
}

.status-icon {
  height: 10px;
  width: 10px;
  border-radius: 5px;
  margin-right: 6px;
  display: inline-block;
}

.is-incomplete {
  .status-icon {
    background: #f0a513;
  }
}

.is-complete {
  .status-icon {
    background: #45B600;
  }
}

.is-empty {
  .status-icon {
    background: #cb4040;
  }
}

.is-synced {
  .status-icon {
    background: #1683E6;
  }
}

.is-duplicate {
  .status-icon {
    background: #7c7c7c;
  }
}

.facility-toolbar {
  min-height: 41px;
  border-top: 1px solid #d2d2d2;
  a {
    padding: 11px 11px 9px;
    text-decoration: none;
  }
}

#addRefrigeratorModal h3{
  margin: 0;
}

.refrigerator-container {
  padding: 2px 15px 15px;
  form {
    margin: 0;
  }
  h3 {
    margin: 0 0 12px;
    input {
      margin-top: 10px;
      font-weight: normal;
    }
  }
  .status-cell {
    text-align: center;
  }
  .list-row.is-expanded {
    background-color: #f9f9f9;
    border-bottom: 2px solid #CCC;
  }
  .list-header,
  .list-row {
    .span2, .span11 {
      margin-left: 0;
    }
    .span3 {
      &:last-child {
        a {
          margin-right: 5px;
          &:last-child {
            margin-right: 0;
          }
        }
      }
    }
    div:last-child input[type="button"] {
      float: none;
      margin-left: 0;
    }
  }
}

.refrigerator-form {
  background: white;
  margin-top: 8px;
  position: relative;
  width: 100%;
  border: 1px solid #EEE;
  margin-bottom: 16px;
  padding: 0 3px;
  .rnr-form-error {
    bottom: 20px;
  }
  .form-group {
    width: 50%;
    float: left;
    border: 0 none;
    margin: 0;
    padding: 0;
    min-width: 400px;
  }
  .form-cell {
    width: 100%;
    label {
      display: inline;
      &:first-child {
        display: block;
        font-weight: bold;
      }
    }
    input[type="text"], input[type="number"] {
      width: 100px;
      margin-right: 5px;
    }
    input[type="checkbox"] {
      margin: 0 2px 0 10px;
      vertical-align: middle;
    }
    input[type="radio"] {
      margin-top: 0px;
      margin-right: 2px;
    }
    .radio-label {
      margin-right: 24px;
    }
    .checkbox-label {
      vertical-align: middle;
      line-height: normal;
    }
    .problem-form {
      width: 100%;
      margin-top: 26px;
      .form-cell {
        width: 47%;
        padding-right: 0;
        padding-bottom: 0;
      }
      #otherTextbox {
        margin-left: 10px;
        margin-bottom: 0;
        width: 290px;
      }
    }
    #notes {
      width: 300px;
      height: 100px;
    }
  }
  #notesCell {
    padding-top: 15px;
  }
}

.isEditable {
  background: #f9f9f9;
}

.facility-distribution-form-table {
  overflow: auto;
  table {
    min-width: 800px;
    tr:nth-child(even) td {
      background: #f9f9f9;
    }
  }
  th {
    text-align: left;
    min-height: 62px;
    font-size: 0.9em;
    font-weight: bold;
    text-shadow: 0 1px 0 #FFF;
    padding: 10px;
    background: linear-gradient(to bottom, #f9f9f9 0%, #e0e0e0 100%);
  }
  td {
    min-height: 71px;
    padding: 10px 10px 6px;
    label {
      display: inline;
      vertical-align: middle;
    }
    .rnr-form-error {
      bottom: 20px;
    }
    .warning-alert {
      bottom: 25px;
    }
  }
  .col-ideal-quantity, .col-target-group, .col-coverage-rate, .col-opened-vial {
    span {
      display: block;
      text-align: right;
    }
  }
  .col-doses, .col-vials {
    min-width: 100px;
    max-width: 250px;
    word-wrap: break-word;
  }
  .col-total {
    min-width: 70px;
  }
  .col-starting-stock, .col-received, .col-distributed, .col-loss, .col-ending-stock, .col-ideal-quantity, .col-existing-quantity, .col-spoiled-quantity, .col-delivered-quantity, .col-complete-vaccinated, .col-health-center, .col-mobile-brigade {
    max-width: 100px;
    min-width: 70px;
    input[type="text"], input[type="number"] {
      text-align: right;
    }
  }
  .col-health-center, .col-mobile-brigade {
    input[type="text"], input[type="number"] {
      text-align: right;
      width: 80px;
    }
  }
  .col-complete-vaccinated {
    input[type="text"], input[type="number"] {
      text-align: right;
      width: 60px;
    }
  }
  input[type="text"], input[type="number"] {
    width: 85%;
    margin-bottom: 3px;
  }
  input[type="checkbox"] {
    margin-top: 0;
  }
  .header-fixed th {
    color: #333;
  }
}

#coverageHeader {
  margin-bottom: 0px;
}

#coverageContainer .rnr-tabs {
  margin: 5px 0 11px;
}

#applyNRContainer {
  width: 55%;
  min-width: 600px;
  padding-bottom: 12px;
}

#coverageTable table {
  width: 55%;
  min-width: 600px;
  th, td {
    word-wrap: break-word;
  }
  tbody {
    tr td:first-child {
      font-weight: bold;
    }
  }
}

.coverage-table td:first-child, #communityCell {
  font-size: 13px;
  font-weight: bold;
  background: linear-gradient(to bottom, #f9f9f9 0%, #e0e0e0 100%) !important;
  text-shadow: 0 1px 0 #FFF;
}

.coverage-table {
  #openedVials {
    width: 100px;
  }
  .opened-vials {
    font-weight: bold;
    input[type="text"], input[type="number"] {
      margin-top: 5px;
    }
    #Polio10Container {
      padding: 43px 0 11px;
    }
    #Polio20Container {
      padding: 27px 0 10px;
    }
    #Penta1Container {
      padding: 11px 0 6px;
    }
    #Penta10Container {
      padding: 22px 0 10px;
    }
    #PCVContainer {
      padding: 54px 0 10px;
    }
  }
}

.facility-visit-container {
  min-width: 600px;
  padding: 2px 20px 15px;
  label {
    font-weight: bold;
  }
  .form-group {
    padding: 0;
    border: none;
  }
  .form-row {
    padding-left: 0;
    margin: 12px 0;
  }
  textarea {
    width: 550px;
    height: 150px;
    margin-bottom: 0;
  }
  .signatures {
    .details-container {
      float: left;
      width: 262px;
      margin-left: 40px;
      &:first-child {
        margin-left: 0;
      }
      span {
        padding: 6px 10px;
        display: inline-block;
        border-bottom: 0;
      }
      div {
        padding: 15px 20px;
        background-color: #f9f9f9;
        border: 1px solid #ccc;

        label {
          font-size: 0.9em;
          font-weight: bold;
          margin-bottom: 3px;
        }

        input[type="text"] {
          margin-bottom: 21px;
          &:last-child {
            margin-bottom: 9px;
          }
        }
      }
    }
  }
  .not-visit-reason-form {
    margin-top: 0;
    .form-row {
      margin: 0 0 5px;
    }
    #otherTextBox {
      width: 305px;
      height: 85px;
    }
  }
  form {
    margin: 0;
  }
  h3 {
    margin: 4px 0 3px;
    a {
      margin-top: 10px;
      font-weight: normal;
    }
  }
}

#synchronizationModal {
  progress {
    width: 95%;
    font-size: 30px;
    margin-left: 25px;
  }
  .info-box {
    padding-bottom: 8px;
    .info-box-labels {
      margin-left: 5px;
      padding-top: 5px;
    }
  }
  .sync-failure-message {
    top: -5px;
    position: relative;
  }

  .icon-exclamation-sign {
    color: rgb(205, 30, 36);
  }
  left: 40%;
  width: 50%;
  .row-fluid {
    width: 95%;
    padding: 10px;
    strong {
      margin-bottom: 10px;
    }
    .facility-name {
      white-space: pre;
    }
  }
}

.delivery-zone-status {
  float: left;
  padding-left: 4%;
}

#deleteDistributionLink {
  text-decoration: none;
}

.icon-remove-sign {
  font-size: 1.4em;
  color: rgb(205, 127, 120);

  &:hover {
    cursor: pointer;
    color: rgb(205, 30, 36);
  }
}

//responsive styles
@media screen and (max-width: 910px) {
  .facility-visit-container {
    min-width: 0px;
    width: 92%;
  }

  .facility-visit-container textarea {
    width: 99%;
  }

  .facility-visit-container .signatures .details-container {
    margin-left: 0px !important;
    margin-top: 40px;
  }

  .facility-info {
    margin-left: 205px;
  }

  .left-navigation {
    width: 205px;
    ul {
      li {
        a {
          font-size: 1.1em;
        }
      }
    }
  }
}

#adultCoverageTable tr:last-child td:first-child {
  height: 50px;
}

.app-cache-status-modal {
  width: 400px;
  margin: -170px 0 0 -200px;
  .icon-ok-circle {
    font-size: 20px;
    color: #468847;
    margin-right: 5px;
  }
  .icon-exclamation-sign {
    font-size: 17px;
    color: #cd1e24;
    margin-right: 5px;
  }
  #downloadingLoader {
    height: 20px;
    background: url('../images/ajax-loader.gif') 38% 50% no-repeat;
    margin-bottom: 6px;
  }
  #successMessage, #errorMessage, .icon {
    vertical-align: middle;
  }
  .modal-footer {
    padding: 10px;
    .btn {
      margin-left: 0;
    }
  }
}

#syncMessage {
  font-size: 15px;
}
